DELIMITER //
DROP TRIGGER delete_orders //
CREATE TRIGGER delete_orders AFTER DELETE ON sklad.orders
 FOR EACH ROW
 BEGIN
  DELETE FROM sklad.order_line WHERE order_id = OLD.order_id;
  DELETE FROM sklad.tracking WHERE order_id = OLD.order_id;
  DELETE FROM sklad.orderHistory WHERE order_id = OLD.order_id;
 END //
DELIMITER ;
